home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 11 / CU Amiga Magazine's Super CD-ROM 11 (1997)(EMAP Images)(GB)(Track 1 of 3)[!][issue 1997-06].iso / s / dropshadowheader.pprx < prev    next >
Text File  |  1992-03-14  |  1KB  |  64 lines

  1. /*@BDropShadowHeader  @P@ICopyright Michael S. Fahrion, Feb, 1992
  2.  
  3. This genie creates a drop shadow for all the text in the selected box.
  4. */
  5. call SafeEndEdit.rexx()
  6. call ppm_AutoUpdate(0)
  7. units = ppm_GetUnits()
  8. if units = 3 then call ppm_SetUnits(1)
  9.  
  10. color = ppm_GetTextColor()
  11. box   = ppm_ClickOnbox("Click on box for drop shadow text..")
  12. if box = 0 then exit_msg()
  13.  
  14.  
  15. if upper(word(ppm_GetBoxInfo(box), 1)) ~= 'TEXT' then
  16.    exit_msg("The box must contain text..")
  17.  
  18. boxpos = ppm_GetBoxPosition(box)
  19. boxleft = word(boxpos, 1)
  20. boxtop = word(boxpos, 2)
  21.  
  22. text  = ppm_GetBoxText(box, 1)
  23. if text = '' then exit_msg("No text in box")
  24.  
  25. call ppm_ShowStatus("Working..")
  26. call SafeSetEdit.rexx(box)
  27. size  = ppm_GetSize()
  28. call SafeEndEdit.rexx()
  29.  
  30. offset = size / 1000
  31. newbox   = ppm_CloneBox(box, offset, offset)
  32.  
  33. colorlist   = ppm_GetColorList()
  34. colorlist   = delstr(colorlist, 1, pos('0a'x, colorlist))
  35. color       = ppm_SelectFromList("Select Drop Shadow Color", 30, 5, 0, colorlist)
  36. if color = '' then exit_msg()
  37.  
  38. call ppm_BoxToFront(box)
  39. call SafeSetEdit.rexx(newbox)
  40. call ppm_SelectBoxText()
  41. call ppm_SetTextColor(color)
  42. call SafeEndEdit.rexx()
  43.  
  44. exit_msg("Done")
  45.  
  46.  
  47. exit_msg: procedure expose color units
  48. do
  49.    call ppm_SetTextColor(color)
  50.    parse arg message
  51.  
  52.  
  53.    if message ~= '' then
  54.       call ppm_Inform(1, message,)
  55.  
  56.    call ppm_SetUnits(units)
  57.    call ppm_ClearStatus()
  58.    call ppm_AutoUpdate(1)
  59.    exit
  60. end
  61.  
  62.  
  63.  
  64.